package com.boot.unity.api.wx.controller;

import com.boot.unity.api.wx.service.WxExampleCoachService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 教练红黑榜
 */
@RestController
@RequestMapping("/wx/exampleCoach")
@Validated
public class WxExampleCoachController {
    private final Log logger = LogFactory.getLog(WxExampleCoachController.class);


    @Autowired
    private WxExampleCoachService wxExampleCoachService;

    /**
     * 驾校红黑榜信息
     *
     * @param sort
     * @param order
     * @return
     */
    @GetMapping("list")
    public Object list(String sort, String order) {
        if (sort == null) {
            sort = "sort";
        }
        if (order == null) {
            order = "asc";
        }
       return wxExampleCoachService.list(sort, order);
    }

}
